package com.yuedou.api;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;

@SpringBootApplication
@Transactional
@EnableScheduling  //  执行 定时任务
@MapperScan("com.yuedou.api.dao")
@ComponentScan(basePackages = {"com.yuedou.api.*"})
@EnableTransactionManagement
@ServletComponentScan
public class YiHuoApiApplication {

    public static void main(String[] args) {
        //SpringApplication.run(GovernApiApplication.class, args);
        //启动WEB项目
        SpringApplication application = new SpringApplication(YiHuoApiApplication.class);
        ConfigurableApplicationContext context = application.run(args);
    }
}
